//
//  AccountManager.h
//  EasyToo
//
//  Created by zhengzhe on 13-8-24.
//
//

#import "ServerCommunicationDelegate.h"

@protocol AccountManagerDelegate <NSObject>

- (void)onLoginSuccess;

- (void)onLoginFailed:(NSString*)errMsg;

//请求验证码
- (void)sendSMSCode:(BOOL)isSuccess
          checkCode:(NSString*)checkCode;

//找回密码
- (void)getPassWd:(BOOL)isSuccess;

//用户注册
- (void)registerUser:(BOOL)isSuccess
           accstatus:(NSString*)accstatus;

//用户登录
- (void)loginUser:(BOOL)isSuccess
        accstatus:(NSString*)accstatus;

//重置密码
- (void)resetPasswd:(BOOL)isSuccess
              point:(NSString*)point;

@end

@interface AccountManager : NSObject <ServerCommunicationDelegate>


@property (nonatomic, assign) id<AccountManagerDelegate> delegate;


+ (AccountManager*)shareManager;

- (void)getAccountInfo:(NSString*)account;

- (void)registerVerify:(NSString*)account
                  Code:(NSString*)code;

//请求验证码
- (void)registerSendVerifyCode:(NSString*)account;


//找回密码
- (void)getPassBySendSMSCode:(NSString*)account;

//用户注册
- (void)userRegister:(NSString*)telephone
            password:(NSString*)password
              cardId:(NSString*)cardId;

//重置密码
- (void)resetPasswd:(NSString*)telephone
            password:(NSString*)password
              cardId:(NSString*)cardId
            apiCode:(NSString*)apiCode;

//用户登录
- (void)login:(NSString *)account
     Password:(NSString *)password;


@end
